'''
Author: 陈荣建 283431730@qq.com
Date: 2023-11-30 16:58:08
LastEditors: 陈荣建 283431730@qq.com
LastEditTime: 2023-12-28 09:57:27
FilePath: /YYGateStrategy/Test.py
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
'''
# !/usr/bin/env python

import logging
import time
import futures_toolbox
import sys
from futures_toolbox import getWanggeSizeForFinallyPrice, getEarningsFromWangge, getScaleOfPendingOrders
from multiprocessing import Process  




logger = logging.getLogger(__name__)
logger.setLevel(level=logging.INFO)

dateDict = {}

def pringPrice(price, count, rate, size, fee):
    earnings = getEarningsFromWangge(price,count,rate,size,fee)
    print(earnings)

def main():
    

    getScaleOfPendingOrders
    return

    # totalSize = getWanggeSizeForFinallyPrice(0.00000018, 0.003, 0.00000004341, 10)
    # totalSize = getWanggeSizeForFinallyPrice(5.0, 0.003, 4, 5)
    totalSize = getWanggeSizeForFinallyPrice(2221.0, 0.004, 1300, 3)
    print(totalSize)
    return
    earnings = getEarningsFromWangge(0.00000003273, 199, 0.004, 5, 0.00044, 10000000, "PEPE2")
    earnings2 = getEarningsFromWangge(2181.1, 6, 0.004, 2, 0.00044, 0.01, "ETH")
    earnings3 = getEarningsFromWangge(3.872, 52, 0.004, 2, 0.00044, 1, "WLD")
    earnings4 = getEarningsFromWangge(14.187, 28, 0.004, 1, 0.00044, 1, "LINK")
    earnings5 = getEarningsFromWangge(0.09113, 11, 0.004, 10, 0.00044, 10, "DOGE")
    earnings6 = getEarningsFromWangge(50.363, 54, 0.004, 1, 0.00044, 0.1, "ORDI")
    earnings7 = getEarningsFromWangge(0.00001019, 23, 0.004, 100, 0.00044, 10000, "SHIB")
    earnings8 = getEarningsFromWangge(0.6081, 8, 0.004, 2, 0.00044, 10, "XRP")


    # earnings4 = getEarningsFromWangge(2.52, 1557, 0.003, 10, 0.00044)
    # earnings5 = getEarningsFromWangge(14.753, 784, 0.004, 5, 0.00044)
    # earnings6 = getEarningsFromWangge(2263, 22, 0.004, 0.02, 0.00044)

    
    print("✅✅ dayTotal: %g" % (earnings + 
                               earnings2 + 
                               earnings3 + 
                               earnings4 + 
                               earnings5 + 
                               earnings6 + 
                               earnings7 + 
                               earnings8)
                               )
    # print("✅ wld total: %g" % earnings4)
    # print("✅ link total: %g" % earnings5)
    # print("✅ eth total: %g" % earnings6)
    # print("✅✅ month total: %g" % (earnings4 + earnings5 + earnings6))


    # p = Process(target=pringPrice, args=(2.403, 58, 0.003, 10, 0.00044))  
    # p2 = Process(target=pringPrice, args=(14.314, 15, 0.004, 5, 0.00044))
    # p3 = Process(target=pringPrice, args=(14.314, 15, 0.004, 5, 0.00044))

    # # p3 = Process(target=creat_wangge, args=("ETH_USDT", 2, "0.1", futures_api, 0.004))

    # p.start()
    # p2.start()
    # p3.start()
    # # p3.start()
    # p.join()
    # p2.join()
    # p3.join()



if __name__ == '__main__':
    main()